<template>
    <div class="user">
        <h2 class="cc">用户名:{{ name }}</h2>
        <h2>年龄:{{ age }}</h2>
        <h2>性别:{{ sex }}</h2>
        <h2>家庭住址:{{ address }}</h2>
    </div>
</template>

<script>
export default {
    name:"User",
    data(){
        return {
            name:"cc",
            age:18,
            sex:"男",
            address:"北京市"
        };
    },
    methods: {
        getMessage(){
            console.log("这是用户组件的消息");
        }
    },
 }
</script>

<style scoped>
.user{
    background-color: aquamarine;
}
.cc{
    color: white;
}
</style>